package com.example.demo.model;

import lombok.Data;
import java.util.Date;
import java.util.List;

@Data
public class MessageInfo {
    private Integer id;
    private String content;
    private Integer pid;
    private Integer senderId;
    private Integer receiverId;
    private Date createTime;
    private Date updateTime;
    private Integer status;
    private Integer isRead;
    private Integer parentId;
    
    // 额外显示字段
    private String senderName;
    private String senderAvatar;
    private String receiverName;
    private String receiverAvatar;
    private String senderNickname;
    private String receiverNickname;
    
    // 回复列表
    private List<MessageInfo> replies;
    
    // 是否是商家回复
    private boolean isSellerReply;
    
    // 判断是否是商家回复的方法
    public boolean getIsSellerReply() {
        return this.senderId != null && this.receiverId != null && this.senderId.equals(this.receiverId);
    }
} 